﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AlbumArtOrganizer.AlbumScanner
{
    public abstract class AlbumScanner : IAlbumScanner
    {
        public AlbumScanner()
        {
            Options = new List<AlbumArtOrganizer.Model.IOption>();
        }

        public event EventHandler<AlbumArtOrganizer.AlbumScanner.AlbumScannerReportProgressEventArgs> ReportProgress;
        public event EventHandler<AlbumArtOrganizer.AlbumScanner.AlbumScannerCompletedEventArgs> Completed;

        protected virtual void OnReportProgress(AlbumScannerReportProgressEventArgs e)
        {
            if (ReportProgress != null)
            {
                ReportProgress(this, e);
            }
        }

        protected virtual void OnCompleted(AlbumScannerCompletedEventArgs e)
        {
            if (Completed != null)
            {
                Completed(this, e);
            }
        }

        public ICollection<AlbumArtOrganizer.Model.IOption> Options
        {
            get;
            set;
        }

        public abstract IEnumerable<AlbumArtOrganizer.Model.IAlbum> GetAlbums();
        public abstract void ReplaceCoverImage(Model.IAlbum album, Model.IImage image);
    }
}
